﻿using FreeSql.DataAnnotations;
using GalaSoft.MvvmLight;
using Newtonsoft.Json;
using PropertyChanged;
using sys_Print.Models;
using System.Collections.Generic;
using System.Linq;

namespace sys_Print.DataAsset
{
    [AddINotifyPropertyChangedInterface]
    [JsonObject(MemberSerialization.OptIn)]
    public partial class ContentType : ObservableObject
    {
        [JsonProperty, Column(Name = "content_model_id", IsPrimary = true)]
        public int ContentModelId { get; set; }

        [JsonProperty, Column(Name = "content_model_Name", DbType = "varchar(255)")]
        public string ContentModelName { get; set; }

        [JsonProperty, Column(Name = "print_model_id")]
        public int PrintModelId { get; set; }

        [JsonProperty, Column(Name = "underline")]
        public double Underline { get; set; }

        [JsonProperty, Column(Name = "first_column_width")]
        public double FirstColumnWidth { get; set; }

        [JsonProperty, Column(Name = "second_column_width")]
        public double SecondColumnWidth { get; set; }

        [Column(IsIgnore = true)]
        public bool IsChanged { get; set; }


        public void AcceptChanges()
        {
            IsChanged = false;
        }

        



    }
}
